package com.project.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class TagetController {

    @RequestMapping("getInfo")
    public String getInfo(HttpServletRequest request){
        //根据共享数据名称，得到共享数据的值
        String str = (String)request.getAttribute("name");
        return "访问getInfo(),共享数据："+str;
    }
}
